<div id="f-form1">{$html}</div>
<script>
    $('#f-form1 form').css('padding','10px');
	$('.wbg').removeClass('wbg');
	$('#f-form1 form').append('<input type="hidden" name="is_add" value="1" />');
	$('#f-form1 #_sendtype').val(1);
	$('#sendBox').removeClass('hidden');
	$('#parentSend').iCheck('uncheck');
	$('#tiketSend').iCheck('uncheck');
	
	
	
	$('#approvernametext').html($('input[name="approvername"]').val() == '' ? '{$memberInfo['name']}' : $('input[name="approvername"]').val());
	$(".selectApprover.binded").html($('#approvernametext').html());
	var btntext = $('#f-form1').parents('.aui_state_focus').find('.aui_footer .btn.btn-primary.btn-sm.btnreset').text();
	$('#f-form1').parents('.aui_state_focus').find('.aui_footer .btn.btn-primary.btn-sm.btnreset').removeAttr('disabled');
	$('#f-form1').find(".checkoutform:eq(0)").Validform({
		
							ajaxPost:true,
							tiptype:function(msg, s, data){
								if(s.type == 1){
									$.ThinkBox.success('正在处理，请稍等……',{'delayClose':500,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
									//$('#f-form1').parents('.aui_state_focus').find('.aui_footer .btn.btn-primary.btn-sm.btnreset').text('正在处理');
									$('#f-form1').parents('.aui_state_focus').find('.aui_footer .btn.btn-primary.btn-sm.btnreset').attr('disabled', 'disabled');
								}
								if(s.type == 3){
								$.ThinkBox.error(msg,{'delayClose':500,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
							}
							},
							datatype:{
								"text":function(gets,obj,curform,regxp){
									return true;
								},"image":function(gets,obj,curform,regxp){
									return true;
								},
								"minNum":function(gets,obj,curform,regxp){
									if($($(obj).attr('dataobj')).val()){
										if(Number($($(obj).attr('dataobj')).val())>Number($(obj).val())){
											return false;	
										}
									}
								},
								"maxNum":function(gets,obj,curform,regxp){
									if($($(obj).attr('dataobj')).val()){
										if(Number($($(obj).attr('dataobj')).val())<Number($(obj).val())||!$(obj).val()){
											return false;	
										}
									}
								},
								"num":function(gets,obj,curform,regxp){
									var ret = /^[0-9]*$/.test(Math.abs($(obj).val()));
						            if(ret){
										if($(obj).val()*1 >= $(obj).attr('min')*1 && $(obj).val()*1 <= $(obj).attr('max')*1){
											return true;
										}else{
											return false;
										}
									}else{
										return false;
									}
								}
							},
							callback:function(data){
								//$('#f-form1').parents('.aui_state_focus').find('.aui_footer .btn.btn-primary.btn-sm.btnreset').text(btntext);
								$('#f-form1').parents('.aui_state_focus').find('.aui_footer .btn.btn-primary.btn-sm.btnreset').removeAttr('disabled');
								if(data.status == 0){
									$.ThinkBox.error(data.info,{'delayClose':200}); 
								}else{
									$.ThinkBox.success(data.info,{'delayClose':500,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
									$('#ajaxlistboxform').submit();
									$('#formlist #taskform input:checked').trigger('change');
									
								}
							}
						});
</script>